Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also create owner WITH clause for single resources #1406

Merged

Conversation

timopollmeier
Copy link
Member

@timopollmeier timopollmeier commented Feb 4, 2021

What:
The function init_get_iterator2_with will now also use acl_where_owned
to generate a WITH clause in case permissions_subject is used in a
subquery.
The init_result_get_iterator_severity had to be adjusted to not generate
the same WITH clause twice.

Why:
This change fixes an error getting details pages for types use the
WITH clauses for permission checks.

How did you test it:
I confirmed it fixed the error by following the link to an OS asset from a host asset in GSA.
I also quickly checked other pages for regressions, including the report details.

Checklist:

The function init_get_iterator2_with will now also use acl_where_owned
to generate a WITH clause in case permissions_subject is used in a
subquery.
The init_result_get_iterator_severity had to be adjusted to not generate
the same WITH clause twice.

This change fixes an error getting details pages for types use the
WITH clauses for permission checks.
@timopollmeier timopollmeier marked this pull request as ready for review February 4, 2021 09:49
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit. Can't say I understand the full details of the code change.

@bjoernricks bjoernricks merged commit ac619bd into greenbone:gvmd-20.08 Feb 4, 2021
@timopollmeier timopollmeier added the backport-to-main This pull request will be ported to the master branch label Feb 8, 2021
timopollmeier added a commit that referenced this pull request Feb 8, 2021
Also create owner WITH clause for single resources (bp #1406)
@timopollmeier timopollmeier deleted the fix-iterator-with-20.08 branch October 15, 2021 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-main This pull request will be ported to the master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants